<template>
	<view class="delivery" style="padding: 20rpx 0;"><job-list :list="jobList"></job-list></view>
</template>

<script>
import JobList from '@/components/JobList.vue';
import { getDeliveryJobList } from '@/apis/delivery/index.js';

export default {
	components: { JobList },
	data() {
		return {
			jobList: []
		};
	},
	mounted() {
		this.initData();
	},
	methods: {
		async initData() {
			const userId = this.$store.state.userInfo.id;
			const res = await getDeliveryJobList({ userId });
			this.jobList = res.data;
		}
	}
};
</script>

<style lang="scss"></style>
